package com.inspur.his.service.impl;

import com.inspur.his.mapper.DrugsMapper;
import com.inspur.his.pojo.Drugs;
import com.inspur.his.service.DrugsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;

@Service("drugsService")
public class DrugsServiceImpl implements DrugsService {
    @Autowired
    private DrugsMapper drugsMapper;


    @Override
    public List<Drugs> drugsList(HashMap map) {
        return  drugsMapper.durgsList(map);
    }
    public void drugsAdd(Drugs drugs){ drugsMapper.drugsAdd(drugs);
    }

    @Override
    public Drugs getDrugsById(String id) {
        return drugsMapper.getDrugsById(id);
    }

    @Override
    public void updatePriceDrugs (Drugs drugs) {
        drugsMapper.updatePriceDrugs(drugs);
    }

    @Override
    public void updateNumDrugs (Drugs drugs) {
        drugsMapper.updateNumDrugs(drugs);
    }

    @Override
    public void deleteDrugsById(String id) {
        drugsMapper.deleteDrugsById(id);
    }
}
